package cn.com.huzo.model.entities.master;

import huzofw.model.entities.BaseEntity;
import huzofw.model.entities.IAggregateRoot;
import java.io.Serializable;
import org.apache.commons.lang3.builder.EqualsBuilder;
import org.apache.commons.lang3.builder.ToStringBuilder;

/**
 * 用户组成员主文件实体类
 *
 * @author 吴旭
 */
public class UserGroupMemberEntity extends BaseEntity implements Serializable, IAggregateRoot {

    private static final long serialVersionUID = 6989893281601713864L;
    private Long UserId;
    private Long CatalogueId;
    private String CatalogueName;
    private String UserName;
    private String DepartmentName;

    public Long getCatalogueId() {
        return CatalogueId;
    }

    public String getCatalogueName() {
        return CatalogueName;
    }

    public Long getUserId() {
        return UserId;
    }

    public String getUserName() {
        return UserName;
    }

    public String getDepartmentName() {
        return DepartmentName;
    }

    public void setCatalogueId(Long CatalogueId) {
        this.CatalogueId = CatalogueId;
    }

    public void setCatalogueName(String CatalogueName) {
        this.CatalogueName = CatalogueName;
    }

    public void setUserId(Long UserId) {
        this.UserId = UserId;
    }

    public void setUserName(String UserName) {
        this.UserName = UserName;
    }

    public void setDepartmentName(String DepartmentName) {
        this.DepartmentName = DepartmentName;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public boolean equals(Object o) {
        if (this == o) {
            return true;
        }
        if (!(o instanceof UserGroupMemberEntity)) {
            return false;
        }

        final UserGroupMemberEntity that = (UserGroupMemberEntity) o;

        return new EqualsBuilder()
                .append(this.getUserId(), that.getUserId())
                .append(this.getCatalogueId(), that.getCatalogueId())
                .isEquals();
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public int hashCode() {
        int result = 17;
        result = 31 * result + this.getUserId().hashCode();
        result = 31 * result + this.getCatalogueId().hashCode();

        return result;
    }

    /**
     * {@inheritDoc}
     */
    @Override
    public String toString() {
        return ToStringBuilder.reflectionToString(this);
    }
}
